package com.hiultra.common.core.domain.entity;

import com.hiultra.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hiultra.common.annotation.Excel;
import com.hiultra.common.core.domain.TreeEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 库房对象 arc_storehouse
 *
 * @author ls
 * @date 2022-08-22
 */
public class ArcStorehouse extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 库房id
     */
    private Long storehouseId;
    private Long parentId;

    /**
     * 祖级列表
     */
    private String ancestors;

    /**
     * 显示顺序
     */
    private Integer orderNum;
    /**
     * 库房名称
     */
    @Excel(name = "库房名称")
    private String storehouseName;

    /**
     * 库房状态（0正常 1停用）
     */
    @Excel(name = "库房状态", readConverterExp = "0=正常,1=停用")
    private Long status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private Long delflag;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }
    /** 子部门 */
    private List<ArcStorehouse> children = new ArrayList<ArcStorehouse>();

    public List<ArcStorehouse> getChildren() {
        return children;
    }

    public void setChildren(List<ArcStorehouse> children) {
        this.children = children;
    }

    public void setStorehouseId(Long storehouseId) {
        this.storehouseId = storehouseId;
    }

    public Long getStorehouseId() {
        return storehouseId;
    }

    public void setStorehouseName(String storehouseName) {
        this.storehouseName = storehouseName;
    }

    public String getStorehouseName() {
        return storehouseName;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public void setDelflag(Long delflag) {
        this.delflag = delflag;
    }

    public Long getDelflag() {
        return delflag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("storehouseId", getStorehouseId())
                .append("parentId", getParentId())
                .append("storehouseName", getStorehouseName())
                .append("ancestors", getAncestors())
                .append("orderNum", getOrderNum())
                .append("status", getStatus())
                .append("delflag", getDelflag())
                .toString();
    }
}
